home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re Forcing a draw.4 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Forcing a draw
  2. Sent:        5/20/96 6:13 PM
  3. Received:    5/22/96 8:31 AM
  4. From:        Serge Froment, sfroment@odyssee.net
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >This easiest way would be to call Invalidate on the view and immediately
  9. >call Draw. We need to add a ForceRedraw method.
  10.  
  11. Henri:
  12.  
  13. I have forced redraw in one my view with the following code, picked from
  14. somewhere in either ODF or ODF Example code:
  15.  
  16. void CMyView::UpdateHighlight(Environment* ev, ODShape* selectionShape,
  17. FW_Boolean redraw)
  18. {
  19.         this->Invalidate(ev, selectionShape);
  20.         if (redraw)
  21.         {
  22.                 FW_CFrameFacetIterator iter(ev, this->GetFrame(ev));
  23.                 for (ODFacet* facet = iter.First(ev);
  24. iter.IsNotComplete(ev); facet = iter.Next(ev))
  25.                         facet->GetWindow(ev)->Update(ev);
  26.         }
  27. }
  28.  
  29. Should I be better replacing the facet->GetWindow(ev)->Update(ev) with a
  30. call to this->Draw(ev, facet, selectionShape)?
  31.  
  32. I was not calling Draw directly because I thought doing so will keep a
  33. pending update event for that window. Is that true?
  34.  
  35. Serge
  36.  
  37.